import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";

const CONFIG = {
  VUE_APP_BASEHOST:'https://hiking.qzctdg.com/api',
  VUE_APP_THEME:'rgb(0,122,255)'
}

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [uni()],
  base: '/h5/',
  define: {
    'process.env': CONFIG,
  },
  css: {
    preprocessorOptions: {
      css: {
        charset: false,
      },
      scss: {
        additionalData:
        `
          @import '~@/styles/varable.scss';
          $theme-color: ${CONFIG.VUE_APP_THEME};
        `
      }
    }
  }
});
